[Unit]
Description=Web application pyapp
After=network.target
[Service]
Type=simple
PIDFile=/apps/pyapp/shared/tmp/pids/service.pid
WorkingDirectory=/apps/pyapp

User=ubuntu
Group=ubuntu

OOMScoreAdjust=-100

ExecStart=/usr/bin/gunicorn -b 127.0.0.1:8081 pyapp:app
TimeoutSec=5

[Install]
WantedBy=multi-user.target